Make python check scripts use of $(PYTHON) make variable.
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 9 Jul 2009 16:05:07 +0000 (17:05 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 9 Jul 2009 16:05:07 +0000 (17:05 +0100)
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
tools/check/Makefile
tools/check/check_python
tools/check/check_python_devel
tools/check/check_python_xml

index 26044721585c40d922c2f0b239491a9d2bddddbf..adfbdaea3ad343eec3f6e0027542f8111435e9ff 100644 (file)
@@ -7,12 +7,12 @@ all install: check-build
 # Check this machine is OK for building on.
 .PHONY: check-build
 check-build:
-       LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ACM_SECURITY=$(ACM_SECURITY) ./chk build
+       PYTHON=$(PYTHON) LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ACM_SECURITY=$(ACM_SECURITY) ./chk build
 
 # Check this machine is OK for installing on.
 .PHONY: check-install
 check-install:
-       LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ACM_SECURITY=$(ACM_SECURITY) ./chk install
+       PYTHON=$(PYTHON) LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ACM_SECURITY=$(ACM_SECURITY) ./chk install
 
 .PHONY: clean
 clean:
index 229809fd48e1dd1633fe840a68031d1140288d3b..cdfe811c1453c4bb0b7baa7d5761e13657ae5f26 100755 (executable)
@@ -3,7 +3,11 @@
 
 . ./funcs.sh
 
-python -c '
+if test -z ${PYTHON}; then
+       PYTHON=`/usr/bin/env python 2>/dev/null`
+fi
+
+${PYTHON} -c '
 import sys
 sys.exit(sys.version_info[0] < 2 or sys.version_info[1] < 2)
 ' || fail "need python version >= 2.2"
index 98d448f4744e65244233bab56bd1577a7d9480d2..dd68568b9b79eb658b8ed99605965369f247a963 100755 (executable)
@@ -3,7 +3,12 @@
 
 . ./funcs.sh
 
-python -c '
+if test -z ${PYTHON}; then
+       PYTHON=`/usr/bin/env python 2>/dev/null`
+fi
+has_or_fail ${PYTHON}
+
+${PYTHON} -c '
 import os.path, sys
 for p in sys.path:
        if os.path.exists(p + "/config/Makefile"):
index 6b65c463c06b058125aa160e42bebdf7abcdfbc1..13ef805e7582ca751541c16bbabc0658c41bdbc6 100755 (executable)
@@ -3,5 +3,10 @@
 
 . ./funcs.sh
 
-python -c 'import xml.dom.minidom' 2>/dev/null || \
+if test -z ${PYTHON}; then
+       PYTHON=`/usr/bin/env python 2>/dev/null`
+fi
+has_or_fail ${PYTHON}
+
+${PYTHON} -c 'import xml.dom.minidom' 2>/dev/null || \
 fail "can't import xml.dom.minidom"